from django.db import migrations, models

class Migration(migrations.Migration):
    dependencies = [
        ('monitor', '0005_alter_host_options_remove_host_description_and_more'),  # 需要根据实际情况修改
    ]

    operations = [
        migrations.AddField(
            model_name='host',
            name='snmp_community',
            field=models.CharField(default='public', max_length=50, verbose_name='SNMP团体名'),
        ),
        migrations.AddField(
            model_name='host',
            name='snmp_port',
            field=models.IntegerField(default=161, verbose_name='SNMP端口'),
        ),
        migrations.AddField(
            model_name='host',
            name='snmp_version',
            field=models.CharField(choices=[('1', 'v1'), ('2c', 'v2c'), ('3', 'v3')], default='2c', max_length=10, verbose_name='SNMP版本'),
        ),
        migrations.AddField(
            model_name='host',
            name='snmp_cpu_usage',
            field=models.FloatField(blank=True, null=True, verbose_name='CPU使用率(SNMP)'),
        ),
        migrations.AddField(
            model_name='host',
            name='snmp_memory_usage',
            field=models.FloatField(blank=True, null=True, verbose_name='内存使用率(SNMP)'),
        ),
        migrations.AddField(
            model_name='host',
            name='snmp_disk_usage',
            field=models.FloatField(blank=True, null=True, verbose_name='硬盘使用率(SNMP)'),
        ),
        migrations.AddField(
            model_name='host',
            name='snmp_last_update',
            field=models.DateTimeField(blank=True, null=True, verbose_name='最后更新时间'),
        ),
        # IPMI相关字段
        migrations.AddField(
            model_name='host',
            name='ipmi_username',
            field=models.CharField(blank=True, max_length=50, null=True, verbose_name='IPMI用户名'),
        ),
        migrations.AddField(
            model_name='host',
            name='ipmi_password',
            field=models.CharField(blank=True, max_length=50, null=True, verbose_name='IPMI密码'),
        ),
        migrations.AddField(
            model_name='host',
            name='temperature',
            field=models.FloatField(blank=True, null=True, verbose_name='温度'),
        ),
        migrations.AddField(
            model_name='host',
            name='power_status',
            field=models.BooleanField(default=False, verbose_name='电源状态'),
        ),
        migrations.AddField(
            model_name='host',
            name='fan_speed',
            field=models.FloatField(blank=True, null=True, verbose_name='风扇转速'),
        ),
    ] 